const express = require('express')
const nunjucks = require('nunjucks')
const appConfig = require('./configs/app.config')
const pageRoute = require('./routes/page.route')
// const apiRoute = require('./routes/api.route')

const app = express()

app.use(express.static('public'))

nunjucks.configure('views', {
  autoescape: true,
  express: app
})

app.use('/admin', pageRoute)
// app.use('/api', apiRoute)

app.listen(appConfig.port, () => {
  console.log('Running on port ' + appConfig.port)
})
